package org.particles.gui;

import java.awt.Color;

import org.particles.domain.Particle;
import org.particles.domain.Vector;
import org.particles.domain.field.FieldParams;

/**
 * proxy class for {@link Particle Particle}. contains
 * GUI specific properties.
 */
public class GuiParticle implements Particle {
	private Particle particle;
	private Color color = Color.WHITE;

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	public GuiParticle(final Particle particle) {
		this.particle = particle;
	}
	
	@Override
	public Vector getSpacePlace() {
		return particle.getSpacePlace();
	}

	@Override
	public void copyStateFrom(Particle particle) {
		this.particle.copyStateFrom(particle);
	}

	@Override
	public double distanceTo(Particle particle) {
		return this.particle.distanceTo(particle);
	}

	@Override
	public Vector getImpulse() {
		return particle.getImpulse();
	}

	@Override
	public void setImpulse(Vector impulse) {
		particle.setImpulse(impulse);
	}

	@Override
	public void setSpacePlace(Vector spacePlace) {
		particle.setSpacePlace(spacePlace);
	}

	@Override
	public long getFields() {
		return particle.getFields();
	}

	@Override
	public double getRadius() {
		return particle.getRadius();
	}

	@Override
	public void setRadius(double radius) {
		particle.setRadius(radius);
	}

	@Override
	public FieldParams getFieldParams(long fieldMarker) {
		return this.particle.getFieldParams(fieldMarker);
	}

	@Override
	public boolean setFieldParams(long fieldMarker, FieldParams params) {
		return this.particle.setFieldParams(fieldMarker, params);
	}

}
